﻿using Restaurant.Business;
using Restaurant.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Restaurant.Site
{
    public class SignInSite
    {
        SignInBusiness signInBusiness = null;

        public async Task<OperationResult> SignIn(Guid subCompanyId, string uid, string pwd)
        {
            if (null == subCompanyId)
                return new OperationResult(OperationResultType.Error, "公司ID不能为空");
            if (string.IsNullOrEmpty(uid) || string.IsNullOrEmpty(pwd))
                return new OperationResult(OperationResultType.Error, "用户名/密码不能为空");

            if (null == signInBusiness)
                signInBusiness = new SignInBusiness();

            return await signInBusiness.SignIn(subCompanyId, uid, pwd);
        }

    }
}
